-- 格式要UTF8-BOM
local TWaryLua = require "TWaryLua";
local initData = require "1";


if not initData then
    error("找不到 initData, 请配置 1.lua")
    return
end;

if initData.ecs_accesskey_id == "" then
    error("initData.ecs_accesskey_id 不能为空, 请配置 1.lua")
    return
end;

if initData.ecs_accesskey_secret == "" then
    error("initData.ecs_accesskey_secret 不能为空, 请配置 1.lua")
    return
end;


local content = "IdentifyServer.exe"
    .. " cn-hongkong"
    .. " ".. initData.ecs_accesskey_id 
    .. " ".. initData.ecs_accesskey_secret

    .. "\n" .. "IdentifyServer.exe"    
    .. " cn-shenzhen"
    .. " ".. initData.ecs_accesskey_id 
    .. " ".. initData.ecs_accesskey_secret

local file = TWaryLua.SaveToFile("./exe/IdentifyServer.bat", content)
print(content)
print("正在写入文件 ./exe/IdentifyServer.bat")